package com.av.bcacc.myapidemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.av.bcacc.jetpack.JetpackMainActivity;
import com.av.bcacc.kotlinpai.KotlinMainActivity;
import com.av.bcacc.myapidemo.databinding.ActivityMainBinding;
import com.av.bcacc.myapidemo.provider.ProviderActivity;

/**
 * @description
 * @author weiliang hu
 * @time 2021/4/21 21:33
 * @email:2072025612@qq.com
 */

public class MainActivity extends AppCompatActivity {

    ActivityMainBinding activityMainBinding ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activityMainBinding= DataBindingUtil.setContentView(this,R.layout.activity_main);
        setSupportActionBar(activityMainBinding.toolbar);
        activityMainBinding.button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                Intent sendIntent = new Intent(Intent.ACTION_SEND);
//                startActivity(sendIntent);
            }
        });
        activityMainBinding.jetpack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, JetpackMainActivity.class));
            }
        });
        activityMainBinding.kotlinBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, KotlinMainActivity.class));
            }
        });
        activityMainBinding.providerBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, ProviderActivity.class));
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.toolbar,menu);
        return true;
    }
}
